package com.base.myproject.client.ui;

import com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;

public class BaseToolBar extends ToolBar {
	
	static BaseToolBar basetoolbar = null;
	
	private BaseToolBar()
	{
		this.add(new LabelToolItem(""));
	}
	private void init()
	{
		
	}
	public static BaseToolBar getInstance()
	{
		if(basetoolbar ==null)
		{
			basetoolbar = new BaseToolBar();
			basetoolbar.setBorders(false);
			basetoolbar.setStyleAttribute("background-image", "url(./gwtbase/images/default/toolbar/bg_2border.gif)");
			basetoolbar.setStyleAttribute("background-repeat", "repeat-x");
//			getLayoutTarget().setStyleAttribute("background-position", "center");
			//basetoolbar.setStyleAttribute("height", "100%");
			basetoolbar.setStyleAttribute("width", "100%");
		}
		return basetoolbar;
	}
	/**
	 * 删除后添加占位符号
	 */
	  public boolean removeAll() {
		    boolean  b = super.removeAll();
		    this.add(new LabelToolItem(""));
		    return b;
		  }
}
